//所有的路由生效
const { teachTextRouter } = require('./teachText.js')
const { pictureRouter } = require('./picture.js')
const { videoRouter } = require('./video.js')
const { questionRouter } = require('./question.js')

const routerArr = [teachTextRouter,pictureRouter,videoRouter,questionRouter]

const useRouters = (app) => {
  routerArr.forEach(router => {
    app.use(
     router.routes(),  //路由中的回调会被触发  //启动路由
     router.allowedMethods()
    )
  })  
} 

module.exports = useRouters